//
//  AudiovisualViewController.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/26.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "AudiovisualViewController.h"

@interface AudiovisualViewController ()

@end

@implementation AudiovisualViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
    
    UIButton *menuBtu = [UIButton buttonWithType:UIButtonTypeCustom];
    menuBtu.frame = CGRectMake(0, 0, 20, 18);
    [menuBtu setBackgroundImage:[UIImage imageNamed:@"menu"] forState:UIControlStateNormal];
    [menuBtu addTarget:self action:@selector(openOrCloseLeftList) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:menuBtu];
    
    
}



#pragma mark button的点击方法
- (void)openOrCloseLeftList {
    
    AppDelegate *tempAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    if (tempAppDelegate.leftslideVC.closed) {
        
        [tempAppDelegate.leftslideVC openLeftView];
        
    } else {
        
        [tempAppDelegate.leftslideVC closeLeftView];
        
    }
    
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
